const getEducationInfo = (no) => {
    console.log(no);
    const pageNo=no;
    return (dispatch) => {
        console.log('aa');
        let url = '/studentInfoController/selectStudentInfoByCond';
        fetch(url, {
            method: 'POST',
            body: JSON.stringify({
                pageNo: pageNo,
                pageSize: 5
            })
        })
            .then(res => res.json())
            .then(res => {
                console.log('actionCreators:', res.data)
                dispatch({
                    type: 'GETINFOMATION',
                    infos: res.data
                })
            })
    }
}

const getSlideShow = () => {
    return (dispatch) => {
        let url = '/slideShowController/selectSlideShowList';
        fetch(url, {
            method: 'POST',
        })
            .then(res => res.json())
            .then(res => {
                console.log('getslideshow:', res.data)
                dispatch({
                    type: 'GETSLIDESHOW',
                    slides: res.data
                })
            })
    }
}

const getConfigController = () => {
    return (dispatch) => {
        let url = '/systemConfigController/selectSystemConfigByCond';
        fetch(url, {
            method: 'POST',
        })
            .then(res => res.json())
            .then(res => {
                console.log('getconfigController:', res.data)
                dispatch({
                    type: 'GETCONFIG',
                    configs: res.data
                })
            })
    }
}
export { getEducationInfo,getSlideShow,getConfigController }